package com.hzhc.controller.wxapp;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hzhc.common.BaseController;
import com.hzhc.enumBean.ResultUtilCodeEnum;
import com.hzhc.service.CntrLogService;
import com.hzhc.utils.ResultUtil;
import com.hzhc.vo.CntrLogVo;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 功不唐捐
 * @date 2024-06-27
 */
@RestController
@RequestMapping("/app")
@RequiredArgsConstructor
public class WxApiCntrLogController extends BaseController {

    private final CntrLogService cntrLogService;

    /**
     * wx 散改集列表list
     * @param vo
     * @return
     */
    @RequestMapping("/getAppLogList")
    public ResultUtil<List<CntrLogVo>> getAppLogList(@RequestBody CntrLogVo vo){
        Page<CntrLogVo> page = new Page<>(vo.getPageIndex(),vo.getPageSize());
        List<CntrLogVo> list = cntrLogService.getAppLogList(page,vo);
        return ResultUtil.build(list,page.getTotal(),page.getPages(), ResultUtilCodeEnum.SUCCESS);
    }




}
